<style>
    #id-tb-don{
        margin: auto;
    }
    #thongtin{
        height: auto;
        width: auto;
    }
</style>
<script>
    $(function() {
        $("#thongtin").dialog({
            autoOpen: false,
            position: [300, 100],
            height: 'auto',
            width: 'auto',
            show: {
                effect: "blind",
                duration: 1000
            },
            hide: {
                effect: "explode",
                duration: 1000
            }
        });
        $("#thongtin").css('ma')
        $(".bt-xemdon").click(function() {
            var Ma_Don_SV = $(this).val();
            $("#thongtin").load("<?php echo base_url() . 'canbo/xemdon2?Ma_Don_SV='; ?>" + Ma_Don_SV);
            $("#thongtin").dialog("open");
        });
    });
</script>
<table id="id-tb-don" style="width: 1100px;">
    <caption>
        <h1>Danh sách các đơn</h1>  
    </caption>
    <tr class="id-silent">
        <th class="silent0">Lớp</th>
        <th class="silent1">Mẫu đơn</th>
        <th class="silent2">Người nộp</th>
        <th class="silent3">MSSV</th>
        <th class="silent4">Thời gian nộp</th>
        <th class="silent5">Tình trạng đơn</th>
        <th class="silent6"></th>
    </tr>
    <?php
    if ($dsdonsv != NULL) {
        foreach ($dsdonsv as $key => $value) {
            ?>
            <tr id="id-silent" >
                <td class="silent0"><p> <?php echo $value['Lop_SV']; ?></p></td>
                <td class="silent1"><p> <?php echo $value['TenBieuMau']; ?></p></td>
                <td class="silent2"><p> <?php echo $value['HoTen_SV']; ?></p></td>
                <td class="silent3"><p> <?php echo $value['FK_Ma_SV']; ?></p></td>
                <td class="silent4"><p> <?php echo $value['NgayLap']; ?> </p></td>   
                <td class="silent5" style="color: #e14f1c" >
                    <?php
                    $mau = common::getMau($value['TrangThai']);
                    echo '<b style="color: ' . $mau . '">' . $value['GhiChu'] . '</b>';
                    ?> 
                </td>   
                <td class="silent6">
                    <form action="<?php echo base_url(); ?>canbo/xemdon" method="POST">
                        <input type="hidden" name="Ma_Don_SV" value="<?php echo $value['Ma_Don_SV']; ?>" />
                        <button class="bt-xemdon" type="button" name="bt" value="<?php echo $value['Ma_Don_SV']; ?>" id="xem-chi-tiet" ><b>Xem chi tiết</b></button>
                        <?php
                        if ($value['TrangThai'] == 2) {
                            echo '<button type="submit" name="bt" value="2"><b>Trả đơn</b></button>';
                        }
                        ?>
                    </form>
                    <div>

                    </div>
                </td>
            </tr>
            <?php
        }
    }
    ?></table>
<div id="thongtin" title="Chi tiết nội dung đơn"></div>